import { ref, computed } from 'vue'
import { defineStore } from 'pinia'

export const useMapCity = defineStore('city', () => {
  const currentCity = ref('北京')
//设置最近访问城市
  const setCurrentCity = (city) => {
    if(city){
      currentCity.value = city
    }
    else{
      currentCity.value = '北京'
    }
  }

  return { currentCity,setCurrentCity}
})
